package com.caine.androidtask.ls26;

import android.content.Context;
import android.util.Log;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.widget.ViewFlipper;

public class GestureListener extends SimpleOnGestureListener {
/**
	private Context context;
	private ViewFlipper flipper;

	public GestureListener(Context context, ViewFlipper flipper) {
		this.context = context;
		this.flipper = flipper;
	}

	@Override
	public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
			float velocityY) {

		//if (e1 != null && e2 != null) {

			if (e1.getX() - e2.getX() > 100) { // LEFT
				flipper.showNext();
				Log.e("CaineZhu","CaineZhu === flipper.showNext();");
			} else if (e2.getX() - e1.getX() > 100) { // RIGHT
				flipper.showPrevious();
				Log.e("CaineZhu","CaineZhu === flipper.showPrevious();");
			}
		//}
		return false;
	}
***/
}
